package com.hoas.quickstart.threads.chapter02.chapter02_3_5;

import java.util.concurrent.atomic.AtomicInteger;

public class AddCountThread extends Thread {

    public AtomicInteger count = new AtomicInteger();

    @Override
    public void run() {
        for (int i = 0; i < 10000; i++) {
            System.out.println(Thread.currentThread().getName() + ", " + count.incrementAndGet());
        }
    }
}
